package com.mdlib.helper.ui.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ljlib.help.R;
import com.mdlib.helper.utils.GlideRoundTransform;

import java.util.List;

/**
 * 作者：HQY on 16/11/23 14:10
 * 邮箱：hqy_xz@126.com
 */

public class OrderDetailsAdapter extends BaseQuickAdapter<String> {


    public OrderDetailsAdapter(List<String> data) {
        super(R.layout.item_order_details, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, String s) {
        baseViewHolder.addOnClickListener(R.id.iv_order_details_pic);
        ImageView view=(ImageView) baseViewHolder.getView(R.id.iv_order_details_pic);
        Glide.with(mContext)
                .load("http://www."+s)
                .transform(new GlideRoundTransform(mContext, 8))
                .placeholder(R.drawable.iv_details_minnetonka)
                .error(R.drawable.iv_details_minnetonka)
                .into(view);
    }
}
